<ui:composition template="/admin/templates/ui2.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:composite="http://java.sun.com/jsf/composite/primefaces"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:archer="http://java.sun.com/jsf/archer"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:c="http://java.sun.com/jsp/jstl/core">
	

	<ui:define name="content">
		<div class="entry">
			<p:toolbar>
				<p:toolbarGroup>
					<h:outputLabel style="padding-left: 15px;"
						value="#{commonMsg.currentPositionLabel} 组织结构列表"></h:outputLabel>
				</p:toolbarGroup>
				<p:toolbarGroup align="right">
					<p:separator />
					<p:button value="新增组织机构" outcome="/admin/huaxi/huaxiOrgEdit"></p:button>
				</p:toolbarGroup>
			</p:toolbar>
			<p:spacer></p:spacer>
			<h:form id="form">
				<p:spacer></p:spacer>
				
				
				<p:spacer></p:spacer>
				<!-- 数据列表 -->
<!-- 				<p:dataTable id="dataTable" value="#{huaxiOrgList.lazyModel}" -->
<!-- 					var="huaxiOrg" paginator="true" paginatorPosition="bottom" -->
<!-- 					rowsPerPageTemplate="15,50,100" -->
<!-- 					rows="15" lazy="true" emptyMessage="#{commonMsg.noResultMsg}"  -->
<!-- 					currentPageReportTemplate="#{commonMsg.pageReportTemplate}" -->
<!-- 					paginatorTemplate="#{commonMsg.paginatorTemplate}"> -->
					
<!-- 					<p:column> -->
<!-- 						<f:facet name="header"> -->
<!-- 							<h:outputLabel value="编号"></h:outputLabel> -->
<!-- 						</f:facet> -->
<!-- 						<h:outputText value="#{huaxiOrg.id}"></h:outputText> -->
<!-- 					</p:column> -->
<!-- 					<p:column> -->
<!-- 						<f:facet name="header"> -->
<!-- 							<h:outputLabel value="名称"></h:outputLabel> -->
<!-- 						</f:facet> -->
<!-- 						<h:outputText value="#{huaxiOrg.orgName}"></h:outputText> -->
<!-- 					</p:column> -->
<!-- 					<p:column> -->
<!-- 						<f:facet name="header"> -->
<!-- 							<h:outputLabel value="上级"></h:outputLabel> -->
<!-- 						</f:facet> -->
<!-- 						<h:outputText value="#{huaxiOrg.parent.orgName}"></h:outputText> -->
<!-- 					</p:column> -->
					
<!-- 				<f:facet name="footer">  -->
<!-- 						<p:commandButton value="导出Excel" ajax="false"> -->
<!-- 							<p:dataExporter target="dataTable" type="xls"  -->
<!-- 								fileName="systemFee" pageOnly="false"></p:dataExporter> -->
<!-- 						</p:commandButton> -->
<!-- 	 		        </f:facet> -->
<!-- 				</p:dataTable> -->
				
				
				<p:treeTable value="#{huaxiOrgList.root}" var="huaxiOrg" id="dataTable1">
					<p:column>
						<f:facet name="header">
                         #{commonMsg.nameLabel}
                     </f:facet>
						<h:outputText value="#{huaxiOrg.orgName}"></h:outputText>
					</p:column>
					<p:column width="100" headerText="上级机构">
						<h:outputText value="#{huaxiOrg.parent.orgName}"></h:outputText>
					</p:column>
						<p:column>
						<f:facet name="header">
                        #{commonMsg.actionLabel}
                    </f:facet>
<!-- 						<sec:ifAllGranted roles="MENU_EDIT"> -->
							<h:link
								outcome="/admin/huaxi/huaxiOrgEdit?id=#{huaxiOrg.id}">编辑</h:link> |
		                    <h:link outcome="/admin/huaxi/huaxiOrgEdit?parentId=#{huaxiOrg.id}">添加下一级</h:link> |
		                    <a href="javascript:void(0)"
								onclick="$('#form\\:deleteId').val('#{menu.id}');confirmDialog.show()">#{commonMsg.deleteLabel}</a>
<!-- 						</sec:ifAllGranted> -->
					</p:column>
				</p:treeTable>
			</h:form>
		</div>
	</ui:define>
</ui:composition>

